package package01;

public class Car extends Transport{

    private String fuel;

    public Car(String name, double speed, String fuel) {
        super(name, speed);
        this.fuel = fuel;
    }

    @Override
    public void showMoveWay() {
        System.out.println(name + "使用" + fuel + "燃料，以" + speed + "km/h的速度行驶");
    }

    @Override
    public void showProperties() {
        super.showProperties();
        System.out.println("燃料类型：" + fuel);
    }


    public void refuel() {
        System.out.println(name + "正在加注" + fuel);
    }


    public String getFuel() {
        return fuel;
    }

    public void setFuelType(String fuel) {
        this.fuel = fuel;
    }
}
